# 匹配整个字符串开头
# import re
#
# s = "cendy"
# print(re.findall('^ce', s))


# 匹配整个字符串的结尾位置
# import re
#
# s = "cendy ss ss ss"
# print(re.findall('ss$', s))


# 匹配单词开头
import re

s = "cendy xdaaa"
print(re.findall(r'\bxd', s))